package com.sjtu.feign;

import com.sjtu.web.Result;
import com.sjtu.web.form.TaskEnableForm;
import com.sjtu.web.form.TaskInfoForm;
import com.sjtu.web.search.TaskInfoSearch;
import com.sjtu.web.vo.TaskInfoVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * nerine
 * 2/2/2020
 */
@FeignClient(contextId = "task-info", name = "SERVER-CORE")
public interface TaskInfoFeign {
    String PREFIX = "/core/task-info";

    @PostMapping(PREFIX + "/list")
    Result<?> list(@RequestBody TaskInfoSearch search);
    @GetMapping(PREFIX + "/detail/{id}")
    Result<TaskInfoVo> detail(@PathVariable String id);
    @PostMapping(PREFIX + "/save")
    Result<?> save(@RequestBody TaskInfoForm form);
    @PostMapping(PREFIX + "/enable")
    Result<?> enable(@RequestBody TaskEnableForm form);
}
